import request from '@/utils/axios-request.js'

const ROLE_BASE_URL = "/api/v1/setting/role";


const SettingRoleAPI = {
    getList(data) {
        return request({
            url: `${ROLE_BASE_URL}`,
            method: 'GET',
            data,
        })
    },
    getOptions() {
        return request({
            url: `${ROLE_BASE_URL}/options`,
            method: 'GET',
        })
    },
    getFormData(id) {
        return request({
            url: `${ROLE_BASE_URL}/${id}`,
            method: "get",
        });
    },
    add(data) {
        return request({
            url: `${ROLE_BASE_URL}`,
            method: 'POST',
            data
        })
    },
    update(id, data) {
        return request({
            url: `${ROLE_BASE_URL}/${id}`,
            method: 'put',
            data
        })
    }
}

export default SettingRoleAPI